package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-03-14.
 */

public class ExchangeEntity  extends com.jbm.jbmsupplier.util.ICtrl implements Serializable {
    private static final long serialVersionUID = 908895120424099562L;
    private int ecId;
    private Integer loginId;
    private Integer points;
    private Integer ecType;
    private Timestamp createDate;
    private Integer targetId;
    private Integer expId;
    public   ExchangeEntity(){}
    public   ExchangeEntity(String method,Integer loginId,Integer expId,Integer ecType){
        this.method=method;
        this.loginId=loginId;
        this.expId=expId;
        this.ecType= ecType;
    }


    public int getEcId() {
        return ecId;
    }

    public void setEcId(int ecId) {
        this.ecId = ecId;
    }


    public Integer getLoginId() {
        return loginId;
    }

    public void setLoginId(Integer loginId) {
        this.loginId = loginId;
    }


    public Integer getPoints() {
        return points;
    }

    public void setPoints(Integer points) {
        this.points = points;
    }

    public Integer getEcType() {
        return ecType;
    }

    public void setEcType(Integer ecType) {
        this.ecType = ecType;
    }


    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }


    public Integer getTargetId() {
        return targetId;
    }

    public void setTargetId(Integer targetId) {
        this.targetId = targetId;
    }

    public Integer getExpId() {
        return expId;
    }

    public void setExpId(Integer expId) {
        this.expId = expId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ExchangeEntity that = (ExchangeEntity) o;

        if (ecId != that.ecId) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (ecType != null ? !ecType.equals(that.ecType) : that.ecType != null) return false;
        if (loginId != null ? !loginId.equals(that.loginId) : that.loginId != null) return false;
        if (points != null ? !points.equals(that.points) : that.points != null) return false;
        if (targetId != null ? !targetId.equals(that.targetId) : that.targetId != null) return false;
        if (expId != null ? !expId.equals(that.expId) : that.expId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ecId;
        result = 31 * result + (loginId != null ? loginId.hashCode() : 0);
        result = 31 * result + (points != null ? points.hashCode() : 0);
        result = 31 * result + (ecType != null ? ecType.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (targetId != null ? targetId.hashCode() : 0);
        result = 31 * result + (expId != null ? expId.hashCode() : 0);
        return result;
    }
}
